<!-- 首页-工具 -->
<template>
  <div style="margin-top:10px">
    <van-grid
      :gutter="0"
      :column-num="5"
      :square="true"
      :border="false"
      :clickable="true"
    >
      <van-grid-item
        v-for="value in menuList"
        :key="value.Id"
        :text="value.text | TextEllipsis(8)"
        @click="onitemclick(value)"
      >
        <template #icon>
          <van-image
            style="margin:10px 10px 0px 10px"
            alt="logo"
            :src="value.meta.icon | SvgFilter('outline')"
          />
        </template>
      </van-grid-item>
    </van-grid>
  </div>
</template>

<script>
import { getAddRouterExpand } from "@/router/routerUtil";
import { mapState, mapMutations, mapGetters, mapActions } from "vuex";

export default {
  name: "HomeTool",
  components: {},
  props: {},
  data() {
    return {};
  },
  computed: {
    ...mapState({
      // 动态主路由
      menuList: state => getAddRouterExpand()
    })
  },
  watch: {},
  created() {},
  methods: {
    onitemclick(data) {
      this.$router.push(data.path);
    }
  }
};
</script>

<style scoped lang="less"></style>
